package com.example.demo.controller;

import com.example.demo.model.ResposeModel;
import com.example.demo.service.PlatDrivingModelService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/*驾照类型*/
@Controller
@RequestMapping("/api/PlatDrivingModel")
public class PlatDrivingModelController {
	private Logger log = LoggerFactory.getLogger(PlatDrivingModelController.class);
	@Autowired
	private PlatDrivingModelService platDrivingModelService;

	@RequestMapping("/getPlatDrivingModels")
	@ResponseBody
	public ResposeModel getPlatDrivingModels() {
		ResposeModel res = new ResposeModel();
		try {
			res.setData(platDrivingModelService.getPlatDrivingModels());
		} catch (Exception e) {
			res.setStatus("0");
			res.setMsg("获取数据出错");
		}

		return res;
	}
	 
}
